<HTML>

<HEAD>
<!-- Generated by CppDoc v2.4.1 on June 07, 2008 at 22:48-->

	<META NAME="GENERATOR" Content="CppDoc">
	<TITLE>Nestopia Core API: Nes::Api::Machine</TITLE>

</HEAD>

<BODY>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#eeeeff">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-overview-summary.html"><B>Overview</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-summary.html"><B>Project</B></a>&nbsp;</TD>
  <TD BGCOLOR="navy"> <FONT COLOR="white">&nbsp;<B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-tree.html"><B>Tree</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-deprecated-list.html"><B>Deprecated</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-all.html"><B>Index</B></a>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>Nestopia Core API</B></EM>
</TD>
</TR>

<TR>
<TD><FONT SIZE="-2">
  <a href="../../index.html" target="_top"><B>FRAMES</B></a>  &nbsp;
&nbsp;<a href="../api/Nes..Api..Machine.html" target="_top"><B>NO FRAMES</B></a></FONT></TD>
</TR>
<TR>
<TD VALIGN="top"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
api</FONT>
<BR>
Class  Nes::Api::Machine</H2>
<PRE>
<code>Base</code>
   |
   +--<B>Nes::Api::Machine</B>

</PRE>
<HR>
<DL>
<DT>class <B><a href="../api/Nes..Api.html">Nes::Api</a>::Machine</B></DT><dt> extends Base
</DL>

<p>Machine interface.
<p>

<HR>


<!-- =========== INNER CLASSES, TYPEDEFS, ENUMS =========== -->

<A NAME="inner_defs_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Inner Classes, Typedefs, and Enums</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>enum</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..Machine..AskProfile.html">Nes::Api::Machine::AskProfile</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Image profile questioning state.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>enum</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..Machine..Compression.html">Nes::Api::Machine::Compression</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Internal compression on states.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>enum</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..Machine..Event.html">Nes::Api::Machine::Event</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Machine events.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>typedef</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..Machine..EventCallback.html">Nes::Api::Machine::EventCallback</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Machine event callback prototype.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>enum</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Favored System.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>enum</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..Machine..Mode.html">Nes::Api::Machine::Mode</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NTSC/PAL mode.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>struct</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..Machine..Patch.html">Nes::Api::Machine::Patch</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Soft-patching context object.</TD>
</TR>
</TABLE>
&nbsp;

<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;static <a href="../api/Nes..Api..Machine..EventCaller.html">Nes::Api::Machine::EventCaller</a></CODE></FONT></TD>
<TD><CODE><B><a href="#eventCallback">eventCallback</a></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Machine event callback manager.</TD>
</TR>
</TABLE>
&nbsp;

<!-- =========== CONSTRUCTOR SUMMARY =========== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD><CODE><B><a href="#Machine(T&)">Machine</a></B>( T& instance )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interface constructor.</TD>
</TR>
</TABLE>
&nbsp;

<!-- =========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;<a href="../api/Nes..Api..Machine..Mode.html">Nes::Api::Machine::Mode</a></CODE></FONT></TD>
<TD><CODE><B><a href="#GetDesiredMode()">GetDesiredMode</a></B>() const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the mode most appropriate for the current image.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;<a href="../api/Nes..Api..Machine..Mode.html">Nes::Api::Machine::Mode</a></CODE></FONT></TD>
<TD><CODE><B><a href="#GetMode()">GetMode</a></B>() const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current mode.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;bool</CODE></FONT></TD>
<TD><CODE><B><a href="#Is(uint,uint)">Is</a></B>( uint flags1, uint flags2 ) const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a machine state.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;uint</CODE></FONT></TD>
<TD><CODE><B><a href="#Is(uint)">Is</a></B>( uint flags ) const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a machine state.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;bool</CODE></FONT></TD>
<TD><CODE><B><a href="#IsLocked()">IsLocked</a></B>() const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells if the machine is in a locked state.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#Load(std::istream&,FavoredSystem,Patch&,AskProfile)">Load</a></B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system, <a href="../api/Nes..Api..Machine..Patch.html">Nes::Api::Machine::Patch</a>& patch, <a href="../api/Nes..Api..Machine..AskProfile.html">Nes::Api::Machine::AskProfile</a> askProfile = DONT_ASK_PROFILE )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads any image.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#Load(std::istream&,FavoredSystem,AskProfile)">Load</a></B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system, <a href="../api/Nes..Api..Machine..AskProfile.html">Nes::Api::Machine::AskProfile</a> askProfile = DONT_ASK_PROFILE )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads any image.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#LoadCartridge(std::istream&,FavoredSystem,Patch&,AskProfile)">LoadCartridge</a></B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system, <a href="../api/Nes..Api..Machine..Patch.html">Nes::Api::Machine::Patch</a>& patch, <a href="../api/Nes..Api..Machine..AskProfile.html">Nes::Api::Machine::AskProfile</a> askProfile = DONT_ASK_PROFILE )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads a cartridge image.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#LoadCartridge(std::istream&,FavoredSystem,AskProfile)">LoadCartridge</a></B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system, <a href="../api/Nes..Api..Machine..AskProfile.html">Nes::Api::Machine::AskProfile</a> askProfile = DONT_ASK_PROFILE )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads a cartridge image.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#LoadDisk(std::istream&,FavoredSystem)">LoadDisk</a></B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads a Famicom Disk System image.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#LoadSound(std::istream&,FavoredSystem)">LoadSound</a></B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads a sound image.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#LoadState(std::istream&)">LoadState</a></B>( std::istream& stream )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads a state.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#Power(bool)">Power</a></B>( bool state )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Powers ON or OFF the machine.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#Reset(bool)">Reset</a></B>( bool state )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the machine.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#SaveState(std::ostream&,Compression)">SaveState</a></B>( std::ostream& stream, <a href="../api/Nes..Api..Machine..Compression.html">Nes::Api::Machine::Compression</a> compression = USE_COMPRESSION ) const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves a state.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#SetMode(Mode)">SetMode</a></B>( <a href="../api/Nes..Api..Machine..Mode.html">Nes::Api::Machine::Mode</a> mode )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the mode.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#Unload()">Unload</a></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unloads the current image.</TD>
</TR>
</TABLE>
&nbsp;

<BR>
<BR>
<!-- ============ Field Detail ========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="eventCallback"><!-- --></A>
<A NAME="eventCallback"><!-- --></A>
<H3>eventCallback</H3>
<PRE>
public static <a href="../api/Nes..Api..Machine..EventCaller.html">Nes::Api::Machine::EventCaller</a> <B>eventCallback</B>;
</PRE>
<DL>
<DD>Machine event callback manager.
Static object used for adding the user defined callback.
</DD>

</DL>
<HR>

<BR>
<!-- ============ Constructor Detail ========== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Machine(T&)"><!-- --></A>
<A NAME="Machine"><!-- --></A>
<H3>Machine</H3>
<PRE>
public <B>Machine</B>( T& instance );
</PRE>
<DL>
<DD>Interface constructor.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>instance</code> - emulator instance</DD>
</DL>

</DL>
<HR>

<BR>
<!-- ============ Method Detail ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="GetDesiredMode()"><!-- --></A>
<A NAME="GetDesiredMode"><!-- --></A>
<H3>GetDesiredMode</H3>
<PRE>
public <a href="../api/Nes..Api..Machine..Mode.html">Nes::Api::Machine::Mode</a> <B>GetDesiredMode</B>() const throw();
</PRE>
<DL>
<DD>Returns the mode most appropriate for the current image.
</DD>
<DL>
<DT><B>Returns: </B><DD>mode</DD>
</DL>

</DL>
<HR>

<A NAME="GetMode()"><!-- --></A>
<A NAME="GetMode"><!-- --></A>
<H3>GetMode</H3>
<PRE>
public <a href="../api/Nes..Api..Machine..Mode.html">Nes::Api::Machine::Mode</a> <B>GetMode</B>() const throw();
</PRE>
<DL>
<DD>Returns the current mode.
</DD>
<DL>
<DT><B>Returns: </B><DD>mode</DD>
</DL>

</DL>
<HR>

<A NAME="Is(uint,uint)"><!-- --></A>
<A NAME="Is"><!-- --></A>
<H3>Is</H3>
<PRE>
public bool <B>Is</B>( uint flags1, uint flags2 ) const throw();
</PRE>
<DL>
<DD>Returns a machine state.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>flags1</code> - OR:ed flags to check
<DD><code>flags2</code> - OR:ed flags to check</DD>
<DT><B>Returns: </B><DD>true if <b>both</b> parameters has at least one flag evaluated to true</DD>
</DL>

</DL>
<HR>

<A NAME="Is(uint)"><!-- --></A>
<A NAME="Is"><!-- --></A>
<H3>Is</H3>
<PRE>
public uint <B>Is</B>( uint flags ) const throw();
</PRE>
<DL>
<DD>Returns a machine state.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>flags</code> - OR:ed flags to check</DD>
<DT><B>Returns: </B><DD>OR:ed flags evaluated to true</DD>
</DL>

</DL>
<HR>

<A NAME="IsLocked()"><!-- --></A>
<A NAME="IsLocked"><!-- --></A>
<H3>IsLocked</H3>
<PRE>
public bool <B>IsLocked</B>() const;
</PRE>
<DL>
<DD>Tells if the machine is in a locked state.
A locked state means that the machine can't respond to
certain operations because it's doing something special,
like playing a movie or rewinding.
</DD>
<DL>
<DT><B>Returns: </B><DD>true if machine is in a locked state.</DD>
</DL>

</DL>
<HR>

<A NAME="Load(std::istream&,FavoredSystem,Patch&,AskProfile)"><!-- --></A>
<A NAME="Load"><!-- --></A>
<H3>Load</H3>
<PRE>
public Result <B>Load</B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system, <a href="../api/Nes..Api..Machine..Patch.html">Nes::Api::Machine::Patch</a>& patch, <a href="../api/Nes..Api..Machine..AskProfile.html">Nes::Api::Machine::AskProfile</a> askProfile = DONT_ASK_PROFILE ) throw();
</PRE>
<DL>
<DD>Loads any image. Input stream can be in XML, iNES, UNIF, FDS or NSF format.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - input stream containing the image to load
<DD><code>system</code> - console to emulate if the core can't do automatic detection
<DD><code>patch</code> - object for performing soft-patching on the image
<DD><code>askProfile</code> - to allow callback triggering if the image has multiple media profiles, default is false</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="Load(std::istream&,FavoredSystem,AskProfile)"><!-- --></A>
<A NAME="Load"><!-- --></A>
<H3>Load</H3>
<PRE>
public Result <B>Load</B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system, <a href="../api/Nes..Api..Machine..AskProfile.html">Nes::Api::Machine::AskProfile</a> askProfile = DONT_ASK_PROFILE ) throw();
</PRE>
<DL>
<DD>Loads any image. Input stream can be in XML, iNES, UNIF, FDS or NSF format.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - input stream containing the image to load
<DD><code>system</code> - console to emulate if the core can't do automatic detection
<DD><code>askProfile</code> - to allow callback triggering if the image has multiple media profiles, default is false</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="LoadCartridge(std::istream&,FavoredSystem,Patch&,AskProfile)"><!-- --></A>
<A NAME="LoadCartridge"><!-- --></A>
<H3>LoadCartridge</H3>
<PRE>
public Result <B>LoadCartridge</B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system, <a href="../api/Nes..Api..Machine..Patch.html">Nes::Api::Machine::Patch</a>& patch, <a href="../api/Nes..Api..Machine..AskProfile.html">Nes::Api::Machine::AskProfile</a> askProfile = DONT_ASK_PROFILE ) throw();
</PRE>
<DL>
<DD>Loads a cartridge image. Input stream can be in XML, iNES or UNIF format.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - input stream containing the image to load
<DD><code>system</code> - console to emulate if the core can't do automatic detection
<DD><code>patch</code> - object for performing soft-patching on the image
<DD><code>askProfile</code> - to allow callback triggering if the image has multiple media profiles, default is false</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="LoadCartridge(std::istream&,FavoredSystem,AskProfile)"><!-- --></A>
<A NAME="LoadCartridge"><!-- --></A>
<H3>LoadCartridge</H3>
<PRE>
public Result <B>LoadCartridge</B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system, <a href="../api/Nes..Api..Machine..AskProfile.html">Nes::Api::Machine::AskProfile</a> askProfile = DONT_ASK_PROFILE ) throw();
</PRE>
<DL>
<DD>Loads a cartridge image. Input stream can be in XML, iNES or UNIF format.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - input stream containing the image to load
<DD><code>system</code> - console to emulate if the core can't do automatic detection
<DD><code>askProfile</code> - to allow callback triggering if the image has multiple media profiles, default is false</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="LoadDisk(std::istream&,FavoredSystem)"><!-- --></A>
<A NAME="LoadDisk"><!-- --></A>
<H3>LoadDisk</H3>
<PRE>
public Result <B>LoadDisk</B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system ) throw();
</PRE>
<DL>
<DD>Loads a Famicom Disk System image. Input stream can be in FDS format.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - input stream containing the image to load
<DD><code>system</code> - console to emulate if the core can't do automatic detection</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="LoadSound(std::istream&,FavoredSystem)"><!-- --></A>
<A NAME="LoadSound"><!-- --></A>
<H3>LoadSound</H3>
<PRE>
public Result <B>LoadSound</B>( std::istream& stream, <a href="../api/Nes..Api..Machine..FavoredSystem.html">Nes::Api::Machine::FavoredSystem</a> system ) throw();
</PRE>
<DL>
<DD>Loads a sound image. Input stream can be in NSF format.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - input stream containing the image to load
<DD><code>system</code> - console to emulate if the core can't do automatic detection</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="LoadState(std::istream&)"><!-- --></A>
<A NAME="LoadState"><!-- --></A>
<H3>LoadState</H3>
<PRE>
public Result <B>LoadState</B>( std::istream& stream ) throw();
</PRE>
<DL>
<DD>Loads a state.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - input stream containing the state</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="Power(bool)"><!-- --></A>
<A NAME="Power"><!-- --></A>
<H3>Power</H3>
<PRE>
public Result <B>Power</B>( bool state ) throw();
</PRE>
<DL>
<DD>Powers ON or OFF the machine.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>state</code> - ON if true</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="Reset(bool)"><!-- --></A>
<A NAME="Reset"><!-- --></A>
<H3>Reset</H3>
<PRE>
public Result <B>Reset</B>( bool state ) throw();
</PRE>
<DL>
<DD>Resets the machine.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>state</code> - hard-reset if true, soft-reset otherwise</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="SaveState(std::ostream&,Compression)"><!-- --></A>
<A NAME="SaveState"><!-- --></A>
<H3>SaveState</H3>
<PRE>
public Result <B>SaveState</B>( std::ostream& stream, <a href="../api/Nes..Api..Machine..Compression.html">Nes::Api::Machine::Compression</a> compression = USE_COMPRESSION ) const throw();
</PRE>
<DL>
<DD>Saves a state.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - output stream which the state will be written to
<DD><code>compression</code> - to allow internal compression in the state, default is USE_COMPRESSION</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="SetMode(Mode)"><!-- --></A>
<A NAME="SetMode"><!-- --></A>
<H3>SetMode</H3>
<PRE>
public Result <B>SetMode</B>( <a href="../api/Nes..Api..Machine..Mode.html">Nes::Api::Machine::Mode</a> mode ) throw();
</PRE>
<DL>
<DD>Sets the mode.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>mode</code> - new mode</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="Unload()"><!-- --></A>
<A NAME="Unload"><!-- --></A>
<H3>Unload</H3>
<PRE>
public Result <B>Unload</B>() throw();
</PRE>
<DL>
<DD>Unloads the current image.
</DD>
<DL>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#eeeeff">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-overview-summary.html"><B>Overview</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-summary.html"><B>Project</B></a>&nbsp;</TD>
  <TD BGCOLOR="navy"> <FONT COLOR="white">&nbsp;<B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-tree.html"><B>Tree</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-deprecated-list.html"><B>Deprecated</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-all.html"><B>Index</B></a>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>Nestopia Core API</B></EM>
</TD>
</TR>

<TR>
<TD><FONT SIZE="-2">
  <a href="../../index.html" target="_top"><B>FRAMES</B></a>  &nbsp;
&nbsp;<a href="../api/Nes..Api..Machine.html" target="_top"><B>NO FRAMES</B></a></FONT></TD>
</TR>
<TR>
<TD VALIGN="top"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>


</BODY>

</HTML>

